package com.thinkgem.jeesite.modules.sys.entity;

import org.hibernate.validator.constraints.Length;
import com.thinkgem.jeesite.modules.sys.entity.User;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 定时任务Entity
 * @author Dean
 * @version 2017-03-08
 */
public class RegularTask extends DataEntity<RegularTask> {
	
	private static final long serialVersionUID = 1L;
	private String taskName;		// task_name
	private String taskMark;		// task_mark
	private String runTime;		// run_time
	private String executeStatus;		// execute_status
	private String taskPath;		// task_path
	private User lastExecuteUser;		// last_execute_user
	private Date lastExecuteTime;		// last_execute_time
	private String memo;		// memo
	
	public RegularTask() {
		super();
	}

	public RegularTask(String id){
		super(id);
	}

	@Length(min=0, max=50, message="task_name长度必须介于 0 和 50 之间")
	public String getTaskName() {
		return taskName;
	}

	public void setTaskName(String taskName) {
		this.taskName = taskName;
	}
	
	@Length(min=0, max=50, message="task_mark长度必须介于 0 和 50 之间")
	public String getTaskMark() {
		return taskMark;
	}

	public void setTaskMark(String taskMark) {
		this.taskMark = taskMark;
	}
	
	@Length(min=0, max=8, message="run_time长度必须介于 0 和 8 之间")
	public String getRunTime() {
		return runTime;
	}

	public void setRunTime(String runTime) {
		this.runTime = runTime;
	}
	
	@Length(min=0, max=1, message="execute_status长度必须介于 0 和 1 之间")
	public String getExecuteStatus() {
		return executeStatus;
	}

	public void setExecuteStatus(String executeStatus) {
		this.executeStatus = executeStatus;
	}
	
	@Length(min=0, max=255, message="task_path长度必须介于 0 和 255 之间")
	public String getTaskPath() {
		return taskPath;
	}

	public void setTaskPath(String taskPath) {
		this.taskPath = taskPath;
	}
	
	public User getLastExecuteUser() {
		return lastExecuteUser;
	}

	public void setLastExecuteUser(User lastExecuteUser) {
		this.lastExecuteUser = lastExecuteUser;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getLastExecuteTime() {
		return lastExecuteTime;
	}

	public void setLastExecuteTime(Date lastExecuteTime) {
		this.lastExecuteTime = lastExecuteTime;
	}
	
	@Length(min=0, max=255, message="memo长度必须介于 0 和 255 之间")
	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}
	
}